Focusing control device, focusing control method, focusing control program, lens device, and imaging device

ABSTRACT

A focusing control device includes: a sensor as defined herein; a first correlation value generation unit as defined herein; a second correlation value generation unit as defined herein; a first phase difference amount measurement unit as defined herein; a second phase difference amount measurement unit as defined herein; a target position determination unit as defined herein; and a lens driving control unit as defined herein, the target position determination unit calculates a temporary target position of the focus lens as defined herein, determines whether or not the target position of the focus lens based on the first phase difference amount falls within a predetermined depth range as defined herein, performs the first process in a case defined herein and performs the second process in a case defined herein, and, in the second process, the target position of the focus lens is determined as defined herein.

CROSS REFERENCE TO RELATED APPLICATION

This is a continuation of International Application No.PCT/JP2016/077506 filed on Sep. 16, 2016, and claims priority fromJapanese Patent Application No. 2015-194234 filed on Sep. 30, 2015, theentire disclosures of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention relates to a focusing control device, a focusingcontrol method, a computer readable medium storing a focusing controlprogram, a lens device, and an imaging device.

2. Description of the Related Art

In recent years, with an increase in resolution of imaging elements,such as a charge coupled device (CCD) image sensor and a complementarymetal oxide semiconductor (CMOS) image sensor, there is a rapid increasein demand for information devices having an imaging function, such as adigital still camera, a digital video camera, and a mobile phone such asa smartphone. The information devices having an imaging functiondescribed above are referred to as imaging devices.

In these imaging devices, as a focusing control method which focuses ona main subject, a contrast auto focus (AF) method or a phase differenceAF method is employed. Since high-speed processing is able to beperformed, the phase difference AF method is a method that isparticularly effective in a case where a moving image is captured bycontinuously imaging a subject by the imaging element.

JP2008-298943A and JP1999-337814A (JP-H11-337814A) disclose an imagingdevice that performs focusing control through the phase difference AFmethod by using a plurality of focus detection areas set on a lightreception surface of the imaging element.

The imaging device of JP2008-298943A calculates a defocus amount of animaging optical system for each of the plurality of focus detectionareas, and determines the focus detection area in which the calculateddefocus amount is minimum, as an optimal area for performing focusadjustment.

The imaging device of JP1999-337814A performs the focus adjustment ofthe imaging optical system based on the defocus amount calculated ineach of all the focus detection areas in a case where the subject doesnot include a moving object, and performs the focusing control of theimaging optical system based on the defocus amount calculated in each ofthe focus detection areas near the moving object in a case where thesubject includes the moving object.

JP2008-197286A discloses an imaging device that dynamically sets thefocus detection area as a target for calculating an AF evaluation valuethrough the contrast AF method depending on a detection result of a mainsubject.

SUMMARY OF THE INVENTION

In the phase difference AF method, outputs of a pair of sensor rows forphase difference detection present in the focus detection area set onthe light reception surface of the imaging element are input as dataitems, and the correlation between the outputs of the pair of sensors isacquired.

Specifically, the data items of one sensor row is A[1], . . . , andA[k], the data items of the other sensor row are B[1], . . . , and B[k].A value of “d” in a case where an area S[d] surrounded by two datawaveforms obtained by the following expression in a case where the twodata items are shifted in one direction as a target of the phasedifference detection by a shift amount of “d” is minimum is calculatedas a phase difference amount, and the focus lens is driven based on thephase difference amount.

$\begin{matrix}\lbrack {{Expression}\mspace{14mu} 1} \rbrack & \; \\{{{S\lbrack d\rbrack} = {\sum\limits_{n = 1}^{k}\; ( {{A\lbrack {n + d} \rbrack} - {B\lbrack n\rbrack}} )^{2}}}{{d = {- L}},\ldots \mspace{14mu},{- 2},{- 1},0,1,2,\ldots \mspace{14mu},L}} & (1)\end{matrix}$

A subject image formed in the focus detection area includes a backgroundimage in addition to a main subject such as a person. Thus, in a casewhere the focus detection area is large, the background of the mainsubject may be in focus or a position between the main subject and thebackground may be in focus from the result of the correlationcalculation.

In a case where the focus detection area is sufficiently smaller thanthe main subject, it is possible to accurately focus on the mainsubject. However, in a case where the main subject moves, it isdifficult to continue to hold only the main subject in the focusdetection area.

In a case where the focus detection area is small, since a feature pointis not present in the subject image in the focus detection area in acase where the subject image formed in the focus detection area isgreatly blurred, the phase difference amount is not able to beaccurately determined.

In a case where the focus detection area is small, a length of the pairof sensor rows is short, and a range of the shift amount d is narrow (avalue of L is small). Thus, determination accuracy of the phasedifference amount is easily influenced by noise.

In a case where the focus detection area is small, the area S[d] inExpression (1) repeatedly increases and decreases in a case whereperiodic patterns such as a subject having streak patterns are captured,and thus, it is difficult to accurately determine the phase differenceamount.

As stated above, although the phase difference AF method has advantagesin both a case where the focus detection area is large and a case wherethe focus detection area is small, it is possible to acquire highfocusing accuracy in a case where it is possible to achieve theseadvantages.

The invention has been made in view of such circumstances, and an objectof the invention is to provide a focusing control device, a focusingcontrol method, a computer readable medium storing a focusing controlprogram, a lens device, and an imaging device capable of improvingfocusing accuracy through a phase difference AF method.

A focusing control device according to the invention comprises a sensorthat has a focus detection area in which a plurality of first signaldetection sections which receives one of a pair of luminous fluxespassing through different portions arranged in one direction of a pupilregion of an imaging optical system including a focus lens and detectssignals corresponding to light reception amounts and a plurality ofsecond signal detection sections which receives the other one of thepair of luminous fluxes and detects signals corresponding to lightreception amounts are formed, a first correlation value generation unitthat acquires correlation values between a first signal group outputfrom the plurality of first signal detection sections of the focusdetection area and a second signal group output from the plurality ofsecond signal detection sections of the focus detection area, a secondcorrelation value generation unit that performs a process of acquiringcorrelation values between a third signal group output from theplurality of first signal detection sections included in each of dividedareas in a state in which the focus detection area is divided in the onedirection and a fourth signal group output from the plurality of secondsignal detection sections included in the divided area, for each dividedarea, a first phase difference amount measurement unit that measures afirst phase difference amount between the first signal group and thesecond signal group from the correlation values acquired by the firstcorrelation value generation unit, a second phase difference amountmeasurement unit that measures a second phase difference amount betweenthe third signal group and the fourth signal group for each divided areafrom the correlation values acquired by the second correlation valuegeneration unit, a target position determination unit that selectivelyperforms a first process of determining a target position of the focuslens based on the first phase difference amount and a second process ofdetermining the target position of the focus lens based on the secondphase difference amount, and a lens driving control unit that drives thefocus lens to the target position determined through the first processor the second process. The target position determination unit calculatesa temporary target position of the focus lens based on any one phasedifference amount of the first phase difference amount and the pluralityof second phase difference amounts, determines whether or not the targetposition of the focus lens based on the first phase difference amountfalls within a predetermined depth range using the temporary targetposition in a movement direction of the focus lens as a reference,performs the first process in a case where the target position of thefocus lens based on the first phase difference amount falls within thedepth range, and performs the second process in a case where the targetposition of the focus lens based on the first phase difference amount isout of the depth range, and the target position of the focus lens isdetermined based on the second phase difference amounts measured for thedivided areas in which the target position of the focus lens based onthe second phase difference amounts falls within the depth range in thesecond process.

A focusing control method according to the invention comprises a firstcorrelation value generation step of acquiring correlation valuesbetween a first signal group output from a plurality of first signaldetection sections of a focus detection area of a sensor and a secondsignal group output from a plurality of second signal detection sectionsof the focus detection area, the plurality of first signal detectionsections which receives one of a pair of luminous fluxes passing throughdifferent portions arranged in one direction of a pupil region of animaging optical system including a focus lens and detects signalscorresponding to light reception amounts and the plurality of secondsignal detection sections which receives the other one of the pair ofluminous fluxes and detects signals corresponding to light receptionamounts being formed in the focus detection area, a second correlationvalue generation step of performing a process of acquiring correlationvalues between a third signal group output from the plurality of firstsignal detection sections included in each of divided areas in a statein which the focus detection area is divided in the one direction and afourth signal group output from the plurality of second signal detectionsections included in the divided area, for each divided area, a firstphase difference amount measurement step of measuring a first phasedifference amount between the first signal group and the second signalgroup from the correlation values acquired in the first correlationvalue generation step, a second phase difference amount measurement stepof measuring a second phase difference amount between the third signalgroup and the fourth signal group for each divided area from thecorrelation values acquired in the second correlation value generationstep, a target position determination step of selectively performing afirst process of determining a target position of the focus lens basedon the first phase difference amount and a second process of determiningthe target position of the focus lens based on the second phasedifference amount, and a lens driving control step of driving the focuslens to the target position determined through the first process or thesecond process. In the target position determination step, a temporarytarget position of the focus lens is calculated based on any one phasedifference amount of the first phase difference amount and the pluralityof second phase difference amounts, whether or not the target positionof the focus lens based on the first phase difference amount fallswithin a predetermined depth range using the temporary target positionin a movement direction of the focus lens as a reference is determined,the first process is performed in a case where the target position ofthe focus lens based on the first phase difference amount falls withinthe depth range, and the second process is performed in a case where thetarget position of the focus lens based on the first phase differenceamount is out of the depth range, and the target position of the focuslens is determined based on the second phase difference amounts measuredfor the divided areas in which the target position of the focus lensbased on the second phase difference amounts falls within the depthrange in the second process.

A focusing control program according to the invention causes a computerto perform a first correlation value generation step of acquiringcorrelation values between a first signal group output from a pluralityof first signal detection sections of a focus detection area of a sensorand a second signal group output from a plurality of second signaldetection sections of the focus detection area, the plurality of firstsignal detection sections which receives one of a pair of luminousfluxes passing through different portions arranged in one direction of apupil region of an imaging optical system including a focus lens anddetects signals corresponding to light reception amounts and theplurality of second signal detection sections which receives the otherone of the pair of luminous fluxes and detects signals corresponding tolight reception amounts being formed in the focus detection area, asecond correlation value generation step of performing a process ofacquiring correlation values between a third signal group output fromthe plurality of first signal detection sections included in each ofdivided areas in a state in which the focus detection area is divided inthe one direction and a fourth signal group output from the plurality ofsecond signal detection sections included in the divided area, for eachdivided area, a first phase difference amount measurement step ofmeasuring a first phase difference amount between the first signal groupand the second signal group from the correlation values acquired in thefirst correlation value generation step, a second phase differenceamount measurement step of measuring a second phase difference amountbetween the third signal group and the fourth signal group for eachdivided area from the correlation values acquired in the secondcorrelation value generation step, a target position determination stepof selectively performing a first process of determining a targetposition of the focus lens based on the first phase difference amountand a second process of determining the target position of the focuslens based on the second phase difference amount, and a lens drivingcontrol step of driving the focus lens to the target position determinedthrough the first process or the second process. In the target positiondetermination step, a temporary target position of the focus lens iscalculated based on any one phase difference amount of the first phasedifference amount and the plurality of second phase difference amounts,whether or not the target position of the focus lens based on the firstphase difference amount falls within a predetermined depth range usingthe temporary target position in a movement direction of the focus lensas a reference is determined, the first process is performed in a casewhere the target position of the focus lens based on the first phasedifference amount falls within the depth range, and the second processis performed in a case where the target position of the focus lens basedon the first phase difference amount is out of the depth range, and thetarget position of the focus lens is determined based on the secondphase difference amounts measured for the divided areas in which thetarget position of the focus lens based on the second phase differenceamounts falls within the depth range in the second process.

A lens device according to the invention comprises the focusing controldevice, and an imaging optical system including a focus lens for causinglight to be incident on the sensor.

An imaging device according to the invention comprises the focusingcontrol device.

According to the invention, it is possible to provide a focusing controldevice, a focusing control method, a focusing control program, a lensdevice, and an imaging device capable of improving focusing accuracythrough a phase difference AF method.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing the schematic configuration of a digitalcamera as an example of an imaging device for describing an embodimentof the invention.

FIG. 2 is a schematic plan view showing the entire configuration of animaging element 5 mounted on the digital camera shown in FIG. 1.

FIG. 3 is a partial enlarged view of one AF area 53 shown in FIG. 2.

FIG. 4 is a diagram showing only phase difference detection pixels 52shown in FIG. 3.

FIG. 5 is a diagram showing a cross-sectional configuration of a phasedifference detection pixel 52A.

FIG. 6 is a diagram showing a configuration in which all pixels includedin the imaging element 5 are imaging pixels 51 and each imaging pixel 51is divided into two.

FIG. 7 is an enlarged view of one AF area 53 shown in FIG. 2.

FIG. 8 is a functional block diagram of a system control unit 11 shownin FIG. 1.

FIG. 9 is a flowchart for describing a focusing control operation bymeans of the system control unit 11 shown in FIG. 8.

FIG. 10 is a diagram showing an example in which a subject H1 havingregular patterns is captured by the AF area 53.

FIG. 11 is a graph showing the result of correlation values acquired forthe AF area 53 shown in FIG. 10 and one divided area 53 s constitutingthe AF area 53.

FIG. 12 is a diagram showing an example in which a subject H2 includinga main subject (person) and background objects (trees) is captured bythe AF area 53.

FIG. 13 is a graph showing the result of correlation values for the AFarea 53 shown in FIG. 12 and one divided area 53 s constituting the AFarea.

FIG. 14 is a flowchart for describing a first modification example ofthe focusing control operation by means of the system control unit 11 ofthe digital camera of FIG. 1.

FIGS. 15A and 15B are schematic diagrams for describing a depth range.

FIG. 16 is a schematic diagram for describing an effect of the firstmodification example.

FIG. 17 is a flowchart for describing a second modification example ofthe focusing control operation by means of the system control unit 11 ofthe digital camera of FIG. 1.

FIG. 18 is a functional block diagram of a system control unit 11 awhich is a modification example of the system control unit 11.

FIG. 19 is a flowchart for describing a target position determinationprocess by means of the system control unit 11 a.

FIG. 20 is a flowchart showing the details of step S30 of FIG. 19.

FIG. 21 is a schematic diagram for describing an effect of a thirdmodification example.

FIG. 22 is a flowchart showing a modification example of the targetposition determination process in the focusing control operation of thesystem control unit 11 a shown in FIG. 18.

FIG. 23 is a flowchart showing a modification example of the targetposition determination process in the focusing control operation of thesystem control unit 11 a shown in FIG. 18.

FIG. 24 is a flowchart showing a modification example of the targetposition determination process in the focusing control operation of thesystem control unit 11 a shown in FIG. 18.

FIG. 25 is a functional block diagram of the system control unit 11 bwhich is a modification example of the system control unit 11.

FIG. 26 is a schematic diagram showing the result of correlationcalculation of two data strings.

FIG. 27 is a schematic diagram showing the result of the correlationcalculation of a data string including data items A to F and divideddata strings in a case where a data string including data items a to fshown in FIG. 26 is divided into three.

FIG. 28 is a diagram showing the schematic configuration of a camerasystem for describing an embodiment of the invention.

FIG. 29 shows the appearance of a smartphone 200 which is an embodimentof an imaging device of the invention.

FIG. 30 is a block diagram showing the configuration of the smartphone200 shown in FIG. 29.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Hereinafter, an embodiment of the invention will be described byreferring to the drawings.

FIG. 1 is a diagram showing the schematic configuration of a digitalcamera as an example of an imaging device for describing an embodimentof the invention.

The digital camera shown in FIG. 1 includes a lens device 40 whichincludes an imaging lens 1, a stop 2, a lens control unit 4, a lensdrive unit 8, and a stop drive unit 9. Although it has been described inthe present embodiment that the lens device 40 is detachably attached toa digital camera main body, the lens device may be fixed to the digitalcamera main body.

The imaging lens 1 and the stop 2 constitute an imaging optical system,and the imaging optical system includes at least a focus lens. The focuslens is a lens for adjusting a focus of the imaging optical system, andis composed of a single lens or a plurality of lenses. The focus lensmoves in an optical axis direction of the imaging optical system, andthus, the focus adjustment is performed.

The lens control unit 4 of the lens device 40 is able to communicatewith a system control unit 11 of the digital camera main body in a wiredor wireless manner. The lens control unit 4 drives the focus lensincluded in the imaging lens 1 through the lens drive unit 8 or drivesthe stop 2 through the stop drive unit 9 according to a command from thesystem control unit 11.

The digital camera main body includes an imaging element 5 which imagesa subject through the imaging optical system, such as a CCD type or aCMOS type, an analog signal processing unit 6 which is connected to anoutput of the imaging element 5 and performs analog signal processingsuch as correlative double sampling processing, and an analog-to-digitalconversion circuit 7 which converts the analog signal output from theanalog signal processing unit 6 into a digital signal. The analog signalprocessing unit 6 and the analog-to-digital conversion circuit 7 arecontrolled by the system control unit 11.

The system control unit 11 that generally controls the entire electriccontrol system of the digital camera drives the imaging element 5through an imaging element drive unit 10, and outputs a subject imagecaptured through the lens device 40, as captured image signals. Acommand signal from a user is input to the system control unit 11through an operating unit 14.

The system control unit 11 includes a processor and a memory such as arandom access memory (RAM) or a read only memory (ROM). The systemcontrol unit 11 realizes functions to be described below by executing afocusing control program stored in a main memory 16 or a built-in ROM.The main memory 16 or the built-in ROM constitutes a non-transitorycomputer-readable recording medium.

The electric control system of the digital camera includes the mainmemory 16, a memory control unit 15 which is connected to the mainmemory 16, a digital signal processing unit 17 which generates capturedimage data by performing interpolation calculation, gamma correctioncalculation, RGB/YC conversion processing, and the like on the capturedimage signals output from the analog-to-digital conversion circuit 7, anexternal memory control unit 20 to which a detachable recording medium21 is connected, and a display control unit 22 to which a display unit23 mounted on a camera rear surface or the like is connected.

The memory control unit 15, the digital signal processing unit 17, theexternal memory control unit 20, and the display control unit 22 areconnected to one another by a control bus 24 and a data bus 25, and arecontrolled according to commands from the system control unit 11.

FIG. 2 is a schematic plan view showing the entire configuration of theimaging element 5 mounted on the digital camera shown in FIG. 1.

The imaging element 5 includes a light reception surface 50 on which aplurality of pixels arranged in a two-dimensional shape in a rowdirection X which is one direction and a column direction Yperpendicular to the row direction X are arranged. Nine focus detectionareas (hereinafter, referred to as AF areas) 53 that are areas astargets to be in focus are formed on the light reception surface 50 inthe example of FIG. 2.

The AF area 53 is an area including imaging pixels and phase differencedetection pixels, as pixels.

Only the imaging pixels are arranged in portions other than AF areas 53on the light reception surface 50. The AF areas 53 may be formed on thelight reception surface 50 without gaps.

FIG. 3 is a partial enlarged view of one AF area 53 shown in FIG. 2.

Pixels 51 are arranged in a two-dimensional shape in the AF area 53. Thepixel 51 includes a photoelectric conversion section such as aphotodiode and a color filter formed in the photoelectric conversionsection.

In FIG. 3, the pixels 51 (referred to as R pixels 51) including thecolor filters (R filters) that transmit red light are assigned acharacter of “R”, the pixels 51 (referred to as G pixels 51) includingthe color filters (G filters) that transmit green light are assigned acharacter of “G”, and the pixels 51 (referred to as B pixels 51)including the color filters (B filters) that transmit blue light areassigned a character of “B”. The arrangement of the color filters is aBayer array on the entire light reception surface 50.

In the AF area 53, some (hatched pixels 51 in FIG. 3) of the G pixels 51are phase difference detection pixels 52. In the example of FIG. 3, theG pixels 51 in an arbitrary pixel row among the pixel rows including theR pixels 51 and the G pixels 51 and G pixels 51 which are closest to theG pixels 51 in the column direction Y and have the same color as that ofthe G pixels are the phase difference detection pixels 52.

FIG. 4 is a diagram showing only the phase difference detection pixels52 shown in FIG. 3.

As shown in FIG. 4, the phase difference detection pixels 52 includestwo kinds of pixels such as phase difference detection pixels 52A andphase difference detection pixels 52B.

The phase difference detection pixel 52A is a first signal detectionsection which receives one of a pair of luminous fluxes passing throughtwo different portions arranged in the row direction X of a pupil regionof the imaging optical system, and detects a signal corresponding to alight reception amount.

The phase difference detection pixel 52B is a second signal detectionsection which receives the other one of the pair of luminous fluxes, anddetects a signal corresponding to a light reception amount.

In the AF area 53, the plurality of pixels 51 other than the phasedifference detection pixels 52A and 52B is the imaging pixels, and theimaging pixels receive a pair of luminous fluxes passing through theimaging lens 1, and detect signals corresponding to light receptionamounts.

A light shielding film is formed on the photoelectric conversionsections of the pixels 51, and openings that prescribe light receptionareas of the photoelectric conversion sections are formed in the lightshielding film.

A center of the opening of the imaging pixel 51 matches a center of thephotoelectric conversion section of the imaging pixel 51. In contrast,the center of the opening (a white portion of FIG. 4) of the phasedifference detection pixel 52A is shifted to the right side from thecenter of the photoelectric conversion section of the phase differencedetection pixel 52A.

The center of the opening (a white portion in FIG. 4) of the phasedifference detection pixel 52B is shifted to the left side from thecenter of the photoelectric conversion section of the phase differencedetection pixel 52B. The right side mentioned herein is one side in therow direction X shown in FIG. 3, and the left side is the other side inthe row direction X.

FIG. 5 is a diagram showing a cross-sectional configuration of the phasedifference detection pixel 52A. As shown in FIG. 5, an opening c of thephase difference detection pixel 52A is shifted to the right side fromthe photoelectric conversion section (PD). As shown in FIG. 5, the oneside of the photoelectric conversion section is covered with the lightshielding film, and thus, light rays incident from a side opposite tothe side covered with the light shielding film are selectively shielded.

With this configuration, it is possible to measure a phase differenceamount between images captured by these two pixel groups, which includeone pixel group including the phase difference detection pixels 52Apresent in an arbitrary row and the other pixel group including thephase difference detection pixels 52B arranged on one side of the phasedifference detection pixels 52A of the one pixel group at the samedistance, in the row direction X.

The imaging element 5 may include a plurality of pairs each includingthe first signal detection section that receives one of the pair ofluminous fluxes passing through the different portions arranged in therow direction X of the pupil region of the imaging optical system anddetects the signal corresponding to the light reception amount and thesecond signal detection section that receives the other one of the pairof luminous fluxes and detects the signal corresponding to the lightreception amount, and is not limited to the configuration shown in FIGS.2 to 5.

For example, all the pixels included in the imaging element 5 are theimaging pixels 51. The imaging pixel 51 is divided into two. One dividedportion may be the phase difference detection pixel 52A, and the otherdivided portion may be the phase difference detection pixel 52B.

FIG. 6 is a diagram showing a configuration in which all the pixelsincluded in the imaging element 5 are the imaging pixels 51 and theimaging pixels 51 are classified into two classification portions.

In the configuration of FIG. 6, the imaging pixel 51 assigned acharacter of R in the imaging element 5 is divided into two, and twodivided portions are a phase difference detection pixel R1 and a phasedifference detection pixel R2.

The imaging pixel 51 assigned a character of G in the imaging element 5is divided into two, and two divided portions are a phase differencedetection pixel G1 and a phase difference detection pixels G2.

The imaging pixel 51 assigned to a character of B in the imaging element5 is divided into two, and two divided portions are a phase differencedetection pixel B1 and a phase difference detection pixels B2.

In this configuration, the phase difference detection pixels R1, G1, andB1 are the first signal detection sections, and the phase differencedetection pixels R2, G2, and B2 are the second signal detectionsections. The signals may be independently read out of the first signaldetection sections and the second signal detection sections.

In a case where the signals of the first signal detection sections andthe second signal detection sections are added, typical imaging signalshaving no phase difference are acquired. That is, in the configurationof FIG. 6, all the pixels may be used as both of the phase differencedetection pixels and the imaging pixels.

As stated above, the imaging element 5 constitutes a sensor having an AFarea in which the plurality of first signal detection sections and theplurality of second signal detection sections are formed.

FIG. 7 is an enlarged view of one AF area 53 shown in FIG. 2. As shownin FIG. 7, the AF area 53 includes five divided areas 53 s divided inthe row direction X which is a detection direction of the phasedifference. The number of divided areas 53 s is not limited to five, andmay be in plural. The plurality of pairs of the phase differencedetection pixels 52A and the phase difference detection pixels 52B isincluded in each divided area 53 s.

FIG. 8 is a functional block diagram of the system control unit 11 shownin FIG. 1. The system control unit 11 functions as a first correlationvalue generation unit 11A, a second correlation value generation unit11B, a first phase difference amount measurement unit 11C, a secondphase difference amount measurement unit 11D, a target positiondetermination unit 11E, and a lens driving control unit 11F by executingthe focusing control program stored in the built-in ROM or the mainmemory 16.

The first correlation value generation unit 11A acquires correlationvalues between a first signal group output from the plurality of firstsignal detection sections (phase difference detection pixels 52A) and asecond signal group output from the plurality of second signal detectionsections (phase difference detection pixels 52B) which are present inthe same AF area 53.

The calculation of Expression (1) is performed by setting the firstsignal group as data A[k] and the second signal group as data B[k], andthus, the first correlation value generation unit 11A acquires thecorrelation values between the first signal group and the second signalgroup.

The second correlation value generation unit 11B acquires correlationvalues between a third signal group output from the plurality of firstsignal detection sections (phase difference detection pixels 52A) and afourth signal group output from the plurality of second signal detectionsections (phase difference detection pixels 52B) which are present ineach of the five divided areas 53 s constituting the AF area 53.

The calculation of Expression (1) is performed by setting the thirdsignal group as data A[k] and the fourth signal group as data B[k], andthus, the second correlation value generation unit 11B acquires thecorrelation values between the third signal group and the fourth signalgroup.

For example, a case where 50 pairs each having the phase differencedetection pixel 52A and the phase difference detection pixel 52B arearranged in the row direction X in the AF area 53 is considered. In thiscase, 10 pairs are arranged in the row direction X in each divided area53 s.

In this example, the first correlation value generation unit 11Aacquires the correlation values between the first signal group and thesecond signal group output from the 50 pairs included in the AF area 53.The second correlation value generation unit 11B acquires thecorrelation values between the third signal group and the fourth signalgroup output from the 10 pairs included in each divided area 53 s.

The first phase difference amount measurement unit 11C measures a firstphase difference amount between the first signal group and the secondsignal group from the correlation values acquired by the firstcorrelation value generation unit 11A.

Specifically, the first phase difference amount measurement unit 11Cmeasures a shift amount between the first signal group and the secondsignal group at which the correlation value acquired by the firstcorrelation value generation unit 11A is minimum, as the first phasedifference amount.

The second phase difference amount measurement unit 11D measures asecond phase difference amount between the third signal group and thefourth signal group for each divided area 53 s from the correlationvalues for each divided area 53 s acquired by the second correlationvalue generation unit 11B.

Specifically, the second phase difference amount measurement unit 11Dmeasures the shift amount between the third signal group and the fourthsignal group at which the correlation value acquired by the secondcorrelation value generation unit 11B is minimum in an arbitrary dividedarea 53 s, as the second phase difference amount in the arbitrarydivided area 53 s.

The target position determination unit 11E selectively performs a firstprocess of determining a target position of the focus lens based on thefirst phase difference amount and a second process of determining thetarget position of the focus lens based on the second phase differenceamount.

Specifically, the target position determination unit 11E determinesreliability of the target position determined through the second processbased on the correlation values acquired by the first correlation valuegeneration unit 11A and the correlation values acquired by the secondcorrelation value generation unit 11B. The target position determinationunit performs the first process in a case where the reliability is equalto or lower than a threshold value, and performs the second process in acase where the reliability exceeds the threshold value.

The lens driving control unit 11F controls the lens control unit 4 todrive the focus lens to the target position determined through the firstprocess or the second process.

FIG. 9 is a flowchart for describing a focusing control operation bymeans of the system control unit 11 shown in FIG. 8. An instruction toperform AF is input to the system control unit 11 by operating theoperating unit 14 in a state in which an arbitrary AF area is selectedby a user of the digital camera from the nine AF areas 53, and thus, theflow shown in FIG. 9 is started.

In a case where the instruction to perform AF is input, the imaging forAF is performed by the imaging element 5, and the captured image signalsacquired through the imaging are input to the system control unit 11.

The first correlation value generation unit 11A performs a firstcorrelation value generation step of acquiring the correlation valuesbetween the first signal group and the second signal group by performingcorrelation calculation of the first signal group output from the phasedifference detection pixels 52A and the second signal group output fromthe phase difference detection pixels 52B which are included in theselected AF area 53 among the captured image signals (step S1).

The second correlation value generation unit 11B performs a secondcorrelation value generation step of acquiring the correlation valuesbetween the third signal group and the fourth signal group for each ofthe divided areas 53 s by performing correlation calculation of thethird signal group output from the phase difference detection pixels 52Aand the fourth signal group output from the phase difference detectionpixels 52B which are included in each divided area 53 s constituting theselected AF area 53 among the captured image signals (step S2).

FIG. 10 is a diagram showing an example in which a subject H1 havingregular patterns is captured by the AF area 53. FIG. 11 is a graphshowing the result of the correlation values acquired for the AF area 53shown in FIG. 10 and one divided area 53 s constituting the AF area.

FIG. 12 is a diagram showing an example in which a subject H2 includinga main subject (person) and background objects (trees) is captured bythe AF area 53. FIG. 13 is a graph showing the result of the correlationvalues acquired for the AF area 53 shown in FIG. 12 and one divided area53 s constituting the AF area.

In FIGS. 11 and 13, the results of the correlation calculation arerepresented as graphs in which a horizontal axis depicts the shiftamount between two signal groups and a vertical axis depicts thecorrelation value between two signal group.

In FIGS. 11 and 13, a curve (correlation curve Cm) of the correlationvalues acquired in step Si and a curve (correlation curve Cs) of thecorrelation values acquired for an arbitrary divided area 53 s in stepS2 are illustrated. Hereinafter, the curve of the correlation valuesacquired in each of five divided areas 53 s is referred to as thecorrelation curve Cs.

After step S2, the first phase difference amount measurement unit 11Cmeasures a shift amount d1 (see FIGS. 11 and 13) at which thecorrelation value is minimum in the correlation curve Cm acquired instep S1, as the first phase difference amount (step S3).

Subsequently, the second phase difference amount measurement unit 11Dmeasures a shift amount d2 (see FIGS. 11 and 13) at which thecorrelation value is minimum in each correlation curve Cs acquired instep S2, as the second phase difference amount (step S4). As shown inFIGS. 11 and 13, the correlation value corresponding to the shift amountd2 in each correlation curve Cs is a first correlation value s1.

Subsequently, the target position determination unit 11E determineswhether or not there is the divided area 53 s in which a difference (anabsolute value without regard to its sign) between the shift amount d1and the shift amount d2 is equal to or less than a shift amountthreshold value th1 (step S5). Although not shown, the process of stepS8 is performed in a case where the shift amount d2 is not able to bemeasured in each divided area 53 s in the process of step S4.

In a case where the determination result of step S5 is YES, the targetposition determination unit 11E determines that the reliability of thesecond process of determining the target position of the focus lensexceeds the threshold value based on the shift amount d2 (step S9).

In a case where the determination result of step S5 is YES, it may bedetermined that the substantially same subject is captured by the AFarea 53 and any of the five divided areas 53 s. Thus, the targetposition determination unit 11E may determine that determinationaccuracy of the target position in a case where the target position isdetermined by using the result of the correlation calculation in thedivided area 53 s is high.

In a case where the determination result of step S5 is NO, the targetposition determination unit 11E detects a second correlation value s2(see FIGS. 11 and 13) which is the correlation value corresponding tothe shift amount d1 in each correlation curve Cs acquired in step S2(step S6).

After step S6, the target position determination unit 11E determineswhether or not there is the divided area 53 s in which the differencebetween the first correlation value s1 and the second correlation values2 is equal to or greater than a correlation threshold value th2 (stepS7).

In a case where it is determined that there is the divided area 53 s inwhich the difference between the first correlation value s1 and thesecond correlation value s2 is equal to or greater than the correlationthreshold value th2, the target position determination unit 11E performsthe process of step S9.

Meanwhile, in a case where it is determined that there is no dividedarea 53 s in which the difference between the first correlation value s1and the second correlation value s2 is equal to or greater than thecorrelation threshold value th2, the target position determination unit11E determines that the reliability of the second process of determiningthe target position of the focus lens is equal to or less than thethreshold value based on the shift amount d2 (step S8).

A state in which the difference between the shift amount d1 and theshift amount d2 is large and the difference between the secondcorrelation value s2 and the first correlation value s1 is small is astate shown in FIG. 11. In such a state, it may be determined that thecorrelation curve Cs repeatedly increases and decreases. Thus, it may bedetermined that repeated patterns shown in FIG. 10 are captured.

Meanwhile, a state in which the difference between the shift amount d1and the shift amount d2 is large and the difference between the secondcorrelation value s2 and the first correlation value s1 is large is astate shown in FIG. 13. In such a state, it may be determined that thecorrelation curve Cs does not repeatedly increase and decrease. Thus, itmay be determined that the repeated patterns shown in FIG. 10 are notcaptured.

Accordingly, in a case where the determination result of step S7 is YES,it may be determined that the reliability of the second process is high,and in a case where the determination result of step S7 is NO, it may bedetermined that the reliability of the second process is low.

After step S8 and step S9, a process of determining the target positionof the focus lens is performed by the target position determination unit11E (step S10).

In step S10, in a case where the process of step S8 is performed, thetarget position determination unit 11E converts the shift amount d1measured in step S3 into a defocus amount, and determines the targetposition of the focus lens based on the defocus amount.

In step S10, in a case where the process of step S9 is performed, thetarget position determination unit 11E converts a minimum value of theshift amounts d2 in the divided areas 53 s measured in step S4 or anaverage value of the shift amounts d2 in the divided areas 53 s into adefocus amount, and determines the target position of the focus lensbased on the defocus amount.

In a case where the process of step S9 is performed, the target positiondetermination unit 11E selects the divided area 53 s in which thedifference between the shift amount d1 and the shift amount d2 is equalto or less than the shift amount threshold value th1 and the dividedarea 53 s in which the difference between the shift amount d1 and theshift amount d2 exceeds the shift amount threshold value th1 and thedifference between the second correlation value s2 and the firstcorrelation value s1 is equal to or greater than the correlationthreshold value th2, among the divided areas 53 s, and extracts theshift amounts d2 acquired in the selected divided areas 53 s.

The target position determination unit 11E may convert a minimum valueof the extracted shift amounts d2 or an average value of the extractedshift amounts d2 into a defocus amount, and may determine the targetposition of the focus lens based on the defocus amount.

After step S10, the lens driving control unit 11F performs a lensdriving control step of moving the focus lens to the target positiondetermined in step S10 (step S11), and the AF operation is ended.

As stated above, according to the digital camera of FIG. 1, in a casewhere the subject in which it is difficult to determine the minimumvalue of the correlation curve Cs is captured as shown in FIG. 11,focusing control is performed based on the first phase difference amountwhich is the shift amount corresponding to the minimum value of thecorrelation curve Cm. Thus, it is possible to focus on the subject withhigh accuracy even in a case where the subject having regular patternsshown in FIG. 10 is captured.

According to the digital camera of FIG. 1, in a case where the subjectin which it is easy to determine the minimum value of the correlationcurve Cs is captured as shown in FIG. 13, focusing control is performedbased on the second phase difference amount which is the shift amountcorresponding to the minimum value of the correlation curve Cs. Thus, itis possible to reduce a possibility that the subject other than the mainsubject will be in focus, and it is possible to focus on the mainsubject with high accuracy.

According to the digital camera of FIG. 1, in a case where the shiftamounts d2 are not able to be measured in the divided areas 53 s in theprocess of step S4 of FIG. 9, the process of step S8 is performed.

Since the divided area 53 s is an area smaller than the AF area 53, in acase where an image captured by the AF area 53 is greatly blurred, thecorrelation curve Cs in each divided area 53 s is a gentle curve, andthe shift amount d2 is not able to be measured.

Even in such a case, since there is a high possibility that the minimumvalue of the correlation curve Cm will be calculated in the AF area 53,the focus lens is driven based on the shift amount corresponding to theminimum value of the correlation curve Cm, and thus, it is possible tofocus on even a greatly blurred subject.

In step S4 of FIG. 9, the shift amount d2 at which the correlation valueis minimum is measured by using the entire correlation curve Cs (a rangein which the shift amount between the third signal group and the fourthsignal group are acquired) as a target.

However, in the correlation curve Cs, the shift amount d2 at which thecorrelation value is minimum may be measured by using a predeterminedrange including a shift amount of zero as a target.

For example, in step S4 of FIG. 9, the shift amount d2 at which thecorrelation value is minimum may be searched for in a range A1 shown inFIG. 11. With a shape in which the correlation curve Cs repeatedlyincreases and decreases as shown in FIG. 11, the subject H1 shown inFIG. 10 is in focus some extent.

That is, in a case where the focus lens is present near the focusingposition, the correlation curve Cs shown in FIG. 11 is acquired.Accordingly, even though the range in which the shift amount d2 issearched for is limited to the range A1 of the shift amountcorresponding to a range including the current position of the focuslens, it is possible to determine whether or not the shape of thecorrelation curve Cs is the shape shown in FIG. 11.

As mentioned above, in step S4 of FIG. 9, the searching range of theshift amount d2 is limited to a part of a range from one end of theshift amount of the correlation curve Cs to the other end, and thus, itis possible to reduce the calculation amount of the system control unit11. Accordingly, it is possible to achieve a decrease in powerconsumption and an increase in speed of the AF.

In the following description, in step S10, in a case where thereliability of the target position based on the shift amount d2 exceedsthe threshold value, the target position is determined based on theshift amount d2. However, in this case, the target position may bedetermined based on the shift amount d1 depending on the situation ofthe subject being captured. Hereinafter, modification examples of stepS10 will be described.

FIRST MODIFICATION EXAMPLE

FIG. 14 is a flowchart for describing a first modification example ofthe focusing control operation by means of the system control unit 11 ofthe digital camera of FIG. 1. The flowchart shown in FIG. 14 is aflowchart showing the details of step S10 of FIG. 9.

In a case where it is determined that the reliability of the targetposition based on the shift amount d2 is equal to or less than thethreshold value (step S20: NO), the target position determination unit11E determines the target position based on the shift amount d1 measuredin step S3 of FIG. 9 (step S21).

Specifically, the target position determination unit 11E converts theshift amount d1 into a defocus amount, and determines the targetposition of the focus lens from the defocus amount and the currentposition of the focus lens.

In a case where it is determined that the reliability of the targetposition based on the shift amount d2 exceeds the threshold value (stepS20: YES), the target position determination unit 11E extracts a minimumvalue of the shift amount d1 and the shift amounts d2 measured for eachdivided area 53 s, and calculates a temporary target position of thefocus lens based on the extracted minimum value (step S22).

Specifically, the target position determination unit 11E converts theextracted minimum value into the defocus amount, and determines thetemporary target position of the focus lens from the defocus amount andthe current position of the focus lens. The temporary target position isa position of the target positions based on the shift amount d1 and theshift amounts d2 measured for the divided areas 53 s, which is closestto the current position of the focus lens.

Subsequently, the target position determination unit 11E determines thetarget position of the focus lens based on the shift amount d1 measuredin step S3, and determines whether or not the target position fallswithin a predetermined depth range using the temporary target positioncalculated in step S22 in the movement direction of the focus lens asthe reference (step S23).

The depth range is set to a very narrow range such as one to two timesthe depth of field in a case where it is assumed that the focus lens ispresent in the temporary target position. The depth range is set on oneside in the movement direction of the focus lens by using the temporarytarget position as a starting point.

In a case where the determination result of step S23 is YES, the targetposition determination unit 11E performs the process of step S21.

In a case where the determination result of step S23 is NO, the targetposition determination unit 11E determines the target positions of thefocus lens for the divided areas 53 s based on the shift amounts d2measured for the divided areas 53 s, and specifies the divided areas 53s in which the target position falls within the depth range (step S24).

Subsequently, the target position determination unit 11E calculates anaverage value of the shift amounts d2 measured for the divided areas 53s specified in step S24 (step S25), and determines a final targetposition based on the calculated average value (step S26).

Specifically, the target position determination unit 11E converts theaverage value into a defocus amount, and determines the final targetposition of the focus lens from the defocus amount and the currentposition of the focus lens.

In step S26, the target position determination unit 11E may select acenter value of the shift amounts d2 measured for the divided area 53 sspecified in step S24, and may determine the final target position basedon the center value.

Alternatively, in step S26, the target position determination unit 11Emay select values acquired by removing the maximum value and the minimumvalue of the shift amounts d2 measured for the divided areas 53 sspecified in step S24, and may determine the final target position basedon an average value of the selected values.

Alternatively, in step S26, the target position determination unit 11Emay calculate a standard deviation of the shift amounts d2 measured forthe divided areas 53 s specified in step S24, may select the shiftamounts d falling within a range of the standard deviation using anaverage value of the measured shift amounts d2 as its center, and maydetermine the final target position based on an average value of theselected values.

Alternatively, in step S26, the target position determination unit 11Emay determine the final target position based on an average valueacquired by performing weighted arithmetic mean in which weights ofvalues (for example, the center value and both neighboring values) whichare close to the center value are relatively large, among the shiftamounts d2 measured for the divided areas 53 s specified in step S24.

After the processes of step S26 and step S21, the focus lens is drivento the determined target position in step S11 of FIG. 9.

As stated above, according to the first modification example, in a casewhere the reliability of the target position based on the shift amountd2 exceeds the threshold value, the focus lens is not driven to thetemporary target position, the divided areas 53 s of which the targetposition based on the shift amount d2 falls within the depth range usingthe temporary target position as the reference are specified, and thetarget position is determined based on the shift amounts d2 measured forthe specified divided areas 53 s.

FIGS. 15A and 15B are schematic diagrams for describing the depth range.In FIGS. 15A and 15B, examples in which two phase difference amounts aremeasured are illustrated. The target position based on the minimum valueof the two phase difference amounts is the temporary target positions inFIGS. 15A and 15B. A target position based on another phase differenceamount is M1. In a case where it is assumed that the focus lens ispresent in the target position, a range in which it is determined thatthe target is in focus is the depth of field.

In a state shown in FIG. 15A, a state in which both a subjectcorresponding to the target position M1 and a subject corresponding tothe temporary target position are in focus is not able to be realized ina case where the focus lens moves to the target position based on anaverage value of the shift amounts d2 corresponding to the temporarytarget position and the target position M1.

In a case where a range which is two times the depth of field using thetemporary target position as its center is set to the depth range, thetarget position M1 overlaps the depth range as shown in FIG. 15B. Inthis case, the focus lens moves to the target position based on anaverage value of the shift amounts corresponding to the temporary targetposition and the target position M1. Thus, a state in which both thesubject corresponding to the target position M1 and the subjectcorresponding to the temporary target position are in focus is able tobe realized. Accordingly, the depth range is set within the range whichis two times the depth of field.

According to the first modification example, in a case where a subjectH3 which extends in a direction which is not perpendicular to and is nothorizontal to the optical axis direction of the imaging optical systemis captured as shown in FIG. 16, it is possible to focus on the entiresubject H3. FIG. 16 shows a state in which an imaging surface includingthe AF area 53 is viewed in a direction horizontal to the imagingsurface.

In the example of FIG. 16, it is assumed that the target position basedon the shift amount d2 measured for the divided area 53 s located at aleft end among the five divided areas 53 s is the temporary targetposition and the target positions based on the shift amounts d2 measuredfor the second and third divided areas 53 s from the left among the fivedivided areas 53 s fall within the depth range using the temporarytarget position as its reference.

In this case, the target position of the focus lens is determined in notan end portion of the subject H3 close to the digital camera but in aposition which is slightly separated from the digital camera so as to befarther than the end portion based on an average value of the shiftamounts d2 measured for the three divided areas 53 s.

As stated above, in the first modification example, it is possible tofocus on the entire subject diagonal to the digital camera in theexample of FIG. 16 compared to a case where the focus lens is driven tothe temporary target position, and it is possible to acquire an image onwhich the entire person is in focus even in a case where the person isdiagonally pictured.

Even in a case where the subject H3 shown in FIG. 16 moves in theoptical axis direction of the imaging optical system and another subjectis present in the temporary target position of FIG. 16, it is possibleto focus on the subject H3 without focusing on the another subject, andit is possible to continue to focus on an intended subject.

In the first modification example, in a case where the target positionbased on the shift amount d1 falls within the depth range using thetemporary target position as the reference, the final target position isdetermined based on the shift amount d1. In this case, it is possible toacquire a state in which the entire subject H3 is in focus by performingthe focusing control by a large AF area 53.

As stated above, according to the first modification example, in a casewhere the reliability of the target position based on the shift amountd2 exceeds the threshold value, it is possible to selectively performthe focusing control using the AF area 53 and the focusing control usingthe divided areas 53 s. Thus, it is possible to perform optimum focusingcontrol depending on an imaging scene, and it is possible to realizehigh focusing accuracy in various scenes.

In the first modification example, step S5 to step S9 of FIG. 9 may beremoved, and step S10 may be performed after step S4. Step S20 of FIG.14 may be removed, and the detailed flow of step S10 may be performed.

SECOND MODIFICATION EXAMPLE

FIG. 17 is a flowchart for describing a second modification example ofthe focusing control operation by means of the system control unit 11 ofthe digital camera of FIG. 1. The flowchart shown in FIG. 17 is aflowchart showing the details of step S10 of FIG. 9.

The flowchart shown in FIG. 17 is different from the flowchart of FIG.14 in that step S23 is removed and step S22 is changed to step S22 a. InFIG. 17, the same processes as those of FIG. 14 will be assigned thesame references, and the description thereof will be omitted. Onlychange points from FIG. 14 will be described.

In a case where the determination result of step S20 is YES, the targetposition determination unit 11E extracts a minimum value of the shiftamounts d2 measured for the divided areas 53 s, and calculates thetemporary target position of the focus lens based on the extractedminimum value (step S22 a).

After step S22 a, the processes of steps S24 to S26 are performed.

Similarly to the first modification example, according to the secondmodification example, in a case where the subject H3 which extends in adirection which is not perpendicular to and is not horizontal to theoptical axis direction of the imaging optical system is captured, it ispossible to focus on the entire subject H3.

THIRD MODIFICATION EXAMPLE

In this modification example, the system control unit 11 of the digitalcamera shown in FIG. 1 is changed to a system control unit 11 a. FIG. 18is a functional block diagram of the system control unit 11 a.

The system control unit 11 a has the same configuration as that of thesystem control unit 11 except that a target position prediction unit 11Gand a phase difference amount prediction unit 11H are added. In FIG. 18,the same components as those of FIG. 8 will be assigned the samereferences.

The target position prediction unit 11G and the phase difference amountprediction unit 11H are functional blocks realized by a processor of thesystem control unit 11 a that executes the focusing control program.

The target position prediction unit 11G predicts a target position ofthe focus lens at the time of the next AF based on a target positionhistory of the focus lens determined by the target positiondetermination unit 11E.

The phase difference amount prediction unit 11H converts a differencebetween the current position of the focus lens and the target positionpredicted by the target position prediction unit 11G into a phasedifference amount, and predicts a phase difference amount at the time ofthe next AF.

A focusing control operation of the system control unit 11 a shown inFIG. 18 is the same as that shown in FIG. 9. A target positiondetermination process (step S10 of FIG. 9) of the focusing controloperation will be described with reference to FIG. 19. FIG. 19 is aflowchart for describing the target position determination process bymeans of the system control unit 11 a.

The flowchart shown in FIG. 19 is different from the flowchart of FIG.14 in that step S22 to step S26 are removed and step S30, step S31, stepS22 b, step S23 a, and step S26 a are added instead. In FIG. 19, thesame processes as those of FIG. 14 will be assigned the same references,and the description thereof will be omitted.

In a case where the determination result of step S20 is YES, the targetposition prediction unit 11G predicts the target position of the focuslens at the time of the next AF based on the past target positions ofthe focus lens determined by the target position determination unit 11E(step S30).

FIG. 20 is a flowchart showing the details of step S30 of FIG. 19. Themovement direction of the focus lens will be described in a case whereit is assumed that a direction in which the focus lens faces an endportion of a movable range of the focus lens close to the subject isexpressed by a plus and a direction in which the focus lens faces an endportion of the movable range thereof close to the digital camera isexpressed by a minus.

The target position prediction unit 11G subtracts a target positiondetermined in a time immediately before a time of the target positionfrom the latest target position of the focus lens determined by thetarget position determination unit 11E, and calculates a change amountof the target position (step S40).

The change amount means that the target position moves to a position atthe time of the previous AF from a position of the AF before the last ina plus direction in a case where the sign is a plus, and means that thetarget position moves to the position at the time of the previous AFfrom the position at the time of the AF before the last in a minusdirection in a case where the sign is a minus.

The target position prediction unit 11G compares the change amountcalculated in step S40 with a plus-direction threshold value (a positivevalue). In a case where the change amount calculated in step S40 exceedsthe plus-direction threshold value (step S41: YES), the target positionprediction unit determines that the target position moves in the plusdirection, and increases a count value indicating a plus-directionchange by one (step S46).

In a case where the count value increased in step S46 exceeds athreshold value th3 (which is a natural number of 1 or greater) (stepS47: YES), the target position prediction unit 11G determines a positionto which the target position moves from the current focus lens positionin the plus direction by an absolute value of the change amountcalculated in step S40, as a predicted target position of the focus lensat the time of the next AF (step S48).

In a case where the count value increased in step S46 is equal to orless than the threshold value th3 (step S47: NO), the target positionprediction unit 11G outputs a predicted result acquired by determiningthe predicted target position at the time of the next AF as the currentposition of the focus lens (step S49).

In a case where the change amount calculated in step S40 is equal to orless than the plus-direction threshold value (step S41: NO), the targetposition prediction unit 11G compares the change amount calculated instep S40 with a minus-direction threshold value (negative value).

In a case where the change amount calculated in step S40 is equal to orgreater than the minus-direction threshold value (step S42: NO), thetarget position prediction unit 11G performs the process of step S49.

In a case where the change amount calculated in step S40 is less thanthe minus-direction threshold value (step S42: YES), the target positionprediction unit 11G determines that the subject moves in the minusdirection, and increases a count value indicating a minus-directionchange by one (step S43).

In a case where the count value increased in step S43 exceeds thethreshold value th3 (step S44: YES), the target position prediction unit11G determines a position to which the target position moves from thecurrent focus lens position in the minus direction by an absolute valueof the change amount calculated in step S40, as a predicted targetposition of the focus lens at the time of the next AF (step S45).

In a case where the count value increased in step S44 is equal to orless than the threshold value th3 (step S44: NO), the target positionprediction unit 11G performs the process of step S49.

Referring back to FIG. 19, in a case where the predicted target positionis acquired in step S30, the phase difference amount prediction unit 11Hconverts a difference between the predicted target position and thecurrent position of the focus lens into a phase difference amount, andcalculates a predicted phase difference amount (step S31).

After step S31, the target position determination unit 11E extracts ashift amount closest to the predicted phase difference amount calculatedin step S31 from the shift amount d1 and the shift amounts d2 calculatedin the divided areas S53 s (step S22 b).

Subsequently, the target position determination unit 11E determineswhether or not the shift amount extracted in step S22 b is the shiftamount d1 (step S23 a).

In a case where the shift amount extracted in step S22 b is the shiftamount d1 (step S23 a: YES), the target position determination unit 11Eperforms the process of step S21.

In a case where shift amount extracted in step S22 b is not the shiftamount d1 and is the shift amount d2 (step S23 a: NO), the targetposition determination unit 11E determines the target position based onthe shift amount d2 extracted in step S22 b (step S26 a).

Specifically, the target position determination unit 11E converts theshift amount d2 extracted in step S22 b into a defocus amount, anddetermines the target position of the focus lens from the defocus amountand the current position of the focus lens.

As stated above, according to the third modification example, in a casewhere a moving subject is captured, the target position of the focuslens is predicted, and the target position is determined based on thephase difference amount closest to the phase difference amountcorresponding to the difference between the predicted target positionand the current position of the focus lens. Thus, it is possible toperform the focusing control following the moving subject.

For example, a case where a subject H4 approaching the digital camera iscaptured as a focusing target is considered as shown in FIG. 21. In theexample of FIG. 21, a case where a subject H5 is present at thesubstantially same distance as that of the subject H4 from the digitalcamera after the subject H4 moves is illustrated.

In the case of FIG. 21, a shift amount (a shift amount d2 measured forthe middle divided area 53 s in the example of FIG. 21) of the shiftamount d1 and the shift amount d2 measured in time t1 which is closestto a phase difference amount predicted based on a predicted movementposition of the subject H4 is extracted in step S22 b.

Accordingly, it is possible to prevent the subject H5 from being infocus by determining the focusing position in time t1 based on the shiftamount d2, and it is possible to continue to focus on the subject H4.

According to the third modification example, it is possible toselectively perform the focusing control using the AF area 53 and thefocusing control using the divided areas 53 s based on the predictedphase difference amount. Thus, it is possible to perform optimumfocusing control depending on an imaging scene, and it is possible torealize high focusing accuracy in various scenes.

In the third modification example, step S5 to step S9 of FIG. 9 may beremoved, and step S10 may be performed after step S4. Step S20 of FIG.19 may be removed, and the detailed flow of step S10 may be performed.

FOURTH MODIFICATION EXAMPLE

FIG. 22 is a flowchart showing a modification example of the targetposition determination process in the focusing control operation of thesystem control unit 11 a shown in FIG. 18.

The flowchart shown in FIG. 22 is different from the flowchart shown inFIG. 19 in that step S22 b and step S23 a are removed and step S26 a ischanged to step S26 b. In FIG. 22, the same processes as those of FIG.19 will be assigned the same references, and the description thereofwill be omitted.

In a case where the predicted phase difference amount is calculated instep S31, the target position determination unit 11E selects the shiftamount closest to the predicted phase difference amount among theamounts d2 measured for the divided areas 53 s, and determines thetarget position based on the selected shift amount d2 (step S26 b).

Similarly to the third modification example, according to the fourthmodification example, it is possible to perform the focusing controlfollowing the moving subject with high accuracy.

FIFTH MODIFICATION EXAMPLE

A fifth modification example is a combination of the third modificationexample (FIG. 19) and the first modification example (FIG. 14).

FIG. 23 is a flowchart showing a modification example of the targetposition determination process in the focusing control operation of thesystem control unit 11 a shown in FIG. 18.

The flowchart shown in FIG. 23 is different from the flowchart shown inFIG. 14 in that step S22 is changed to step S22 d and step S30 and stepS31 described in FIG. 19 are added between step S22 d and step S20. InFIG. 23, the same processes as those of FIGS. 14 and 19 will be assignedthe same references, and the description thereof will be omitted.

After step S31, the target position determination unit 11E extracts theshift amount closest to the predicted phase difference amount calculatedin step S31 from the shift amount d1 and the shift amounts d2 measuredfor the divided areas 53 s, and calculates the temporary target positionof the focus lens based on the extracted shift amount (step S22 d).

After step S22 d, step S23 and the subsequent processes are performed.

As stated above, according to the fifth modification example, it ispossible to acquire an effect of the third modification example ofcontinuing to focus on the moving subject with high accuracy and aneffect of the first modification example of focusing on the entiresubject which extends diagonally.

In the fifth modification example, step S5 to step S9 of FIG. 9 may beremoved, and step S10 may be performed after step S4. Step S20 of FIG.23 may be removed, and the detailed flow of step S10 may be performed.

SIXTH MODIFICATION EXAMPLE

A sixth modification example is a combination of the second modificationexample (FIG. 17) and the fourth modification example (FIG. 22).

FIG. 24 is a flowchart showing a modification example of the targetposition determination process in the focusing control operation of thesystem control unit 11 a shown in FIG. 18.

The flowchart shown in FIG. 24 is different from the flowchart shown inFIG. 17 in that step S22 a is changed to step S22 e and step S30 andstep S31 described in FIG. 19 are added between step S22 e and step S20.In FIG. 24, the same processes as those of FIGS. 17 and 19 will beassigned the same references, and the description thereof will beomitted.

After step S31, the target position determination unit 11E extracts theshift amount closest to the predicted phase difference amount calculatedin step S31 from the shift amounts d2 measured for the divided areas 53s, and calculates the temporary target position of the focus lens basedon the extracted shift amount (step S22 e).

After step S22 e, step S24 and the subsequent processes are performed.

As stated above, according to the sixth modification example, it ispossible to acquire an effect of the fourth modification example ofcontinuing to focus on the moving subject with high accuracy and aneffect of the second modification example of focusing on the entiresubject which diagonally extends.

SEVENTH MODIFICATION EXAMPLE

In a seventh modification example, the system control unit 11 of thedigital camera shown in FIG. 1 is changed to a system control unit 11 b.FIG. 25 is a functional block diagram of the system control unit 11 b.The system control unit 11 b has the same configuration as that of thesystem control unit 11 except that a method of generating thecorrelation values by means of the second correlation value generationunit 11B is different.

The second correlation value generation unit 11B of the system controlunit 11 b generates the correlation values for each divided area 53 swithout performing the correlation calculation by using the calculationresult of the correlation values by means of the first correlation valuegeneration unit 11A.

Specifically, the second correlation value generation unit 11B of thesystem control unit 11 b acquires the correlation values between thethird signal group and the fourth signal group for an arbitrary dividedarea 53 s by decomposing correlation values between the first signalgroup and the second signal group generated by the first correlationvalue generation unit 11A which corresponds to an arbitrary shift amountinto components for each divided area 53 s and storing an integratedvalue of the decomposed components in an arbitrary divided area 53 s, asa correlation value at an arbitrary shift amount of the arbitrarydivided area 53 s.

Hereinafter, the method of generating the correlation values by means ofthe second correlation value generation unit 11B of the system controlunit 11 b will be described with reference to FIGS. 26 and 27.

FIG. 26 is a schematic diagram showing the result of correlationcalculation of two data strings.

FIG. 26 shows that a data string including data items A to F output fromthe phase difference detection pixels 52A and a data string includingdata items a to f output from the phase difference detection pixels 52B.

In FIG. 26, a value which is the square of a difference between data M(M=A, B, C, D, E, and F) and data N (N=a, b, c, d, e, and f) is depictedas a component MN constituting the correlation value. For example, thesquare of the difference between the data A and the data f is depictedas “Af”.

The correlation calculation is a process of shifting the data stringincluding the data items a to f from the data string including the dataitems A to F in a range of −5 to +5 one by one, calculating the squareof the difference between the data items of which the positions in adirection in which the data string is shifted at each shift amount arethe same, and acquiring the sum of the calculated square values as thecorrelation value corresponding to each shift amount.

For example, in the example of FIG. 26, a correlation value in a casewhere shift amount=−5 is “Af”, a correlation value in a case where shiftamount=−4 is “Ae”+“Bf”, and a correlation value in a case where shiftamount=−3 is “Ad”+“Be”+“Cf”.

FIG. 27 is a schematic diagram showing the result of the correlationcalculation of the data string including the data items A to F anddivided data strings in a case where the data string including the dataitems a to f shown in FIG. 26 is divided into three. Similarly to FIG.26, a value which is the square of the difference between the data M(M=A, B, C, D, E, and F) and the data N (N=a, b, c, d, e, and f) isdepicted as a component “MN” constituting the correlation value in FIG.27.

As can be seen from FIGS. 26 and 27, the square value “MN” acquired asthe result of the correlation calculation of FIG. 26 is constituted bythe square value acquired through the correlation calculation of eachdivided data string and the data string including the data items A to F.

In FIG. 26, the square value MN acquired through the correlationcalculation of the divided data string including the data items a and band the data string including the data items A and F is depicted as adashed line block.

In FIG. 26, the square value MN acquired through the correlationcalculation of the divided data string including the data items c and dand the data string including the data items A to F is depicted as asolid line block.

In FIG. 26, the square value MN acquired through the correlationcalculation of the divided data string including the data items e and fand the data string including the data items A to F is depicted as adashed dotted line block.

The second correlation value generation unit 11B of the system controlunit 11 b decomposes the correlation values for the shift amountsacquired as the result acquired by performing the correlationcalculation by means of the first correlation value generation unit 11Ainto components (dashed line blocks in FIG. 26) of the divided datastring including the data items a and b, components (solid line blocksin FIG. 26) of the divided data string including the data items c and d,and components (dashed dotted line blocks in FIG. 26) of the divideddata string including the data items e and f.

The second correlation value generation unit 11B of the system controlunit 11 b generates the correlation values between the third signalgroup and the fourth signal group output from an arbitrary divided areaby integrating the square values of the decomposed components of thearbitrary divided data string for the same shift amount and storing theintegrated value as the correlation value corresponding to the shiftamount.

According to this modification example, since the second correlationvalue generation unit 11B does not perform the correlation calculation,the second correlation value generation unit reduces a processing amountof the system control unit 11 b required for the AF, and thus, it ispossible to achieve a decrease in power consumption and an increase inspeed of the AF.

The seventh modification example may be a combination of the firstmodification example to the sixth modification example.

In the digital camera described above, the system control unit 11, thesystem control unit 11 a, and the system control unit 11 b constitutethe focusing control device. Although it has been described in thedigital camera of FIG. 1 that the imaging element 5 for imaging thesubject is also used as a sensor for AF, a dedicated sensor differentfrom the imaging element 5 may be included in the digital camera.

Although the digital camera including the focusing control device isused as an example, the invention may be applied to a camera system forbroadcasting.

FIG. 28 is a diagram showing the schematic configuration of a camerasystem for describing an embodiment of the invention. The camera systemis suitable for camera systems for business such as broadcasting ormovie.

The camera system shown in FIG. 28 includes a lens device 100 and acamera device 300 as an imaging device to which the lens device 100 isattached.

The lens device 100 includes a focus lens 111, zoom lens 112 and 113, astop 114, and a master lens group 115, and these lenses are arranged ina line in order from the lens close to the subject.

The focus lens 111, the zoom lenses 112 and 113, the stop 114, and themaster lens group 115 constitute the imaging optical system. The imagingoptical system includes at least the focus lens 111.

The lens device 100 further includes a beam splitter 116 including areflection surface 116 a, a mirror 117, a condenser lens 118, aseparator lens 119, and an AF unit 121 including an imaging element 120.The imaging element 120 is an image sensor such as a CMOS type imagesensor or a CCD type image sensor including a plurality of pixelsarranged in a two-dimensional shape.

The beam splitter 116 is disposed between the stop 114 and the masterlens group 115 on an optical axis K. The beam splitter 116 transmitssome (for example, 80% of the subject light rays) of subject light rayswhich are incident on the imaging optical system and pass through thestop 114, and reflects the remaining light rays (for example, 20% of thesubject light rays) acquired by subtracting the some of the subjectlight rays from the reflection surface 116 a in a directionperpendicular to the optical axis K.

The position of the beam splitter 116 is not limited to the positionshown in FIG. 28, and the beam splitter may be positioned behind thelens of the imaging optical system closest to the subject on the opticalaxis K.

The mirror 117 is disposed on an optical path of the light raysreflected from the reflection surface 116 a of the beam splitter 116.Thus, the light rays are reflected, and are incident on the condenserlens 118 of the AF unit 121.

The condenser lens 118 concentrates the light rays reflected from themirror 117.

As shown as an enlarged front view surrounded by a dashed line in FIG.28, the separator lens 119 is composed of two lenses 19R and 19Larranged in a line in a direction (a horizontal direction in the exampleof FIG. 28) with an optical axis of the imaging optical systeminterposed therebetween.

The subject light rays concentrated by the condenser lens 118 passthrough the two lenses 19R and 19L, and form images in differentpositions on a light reception surface (a surface on which a pluralityof pixels is formed) of the imaging element 120. That is, a pair ofsubject light images shifted in one direction and a pair of subjectlight images shifted in direction perpendicular to the one direction areformed on the light reception surface of the imaging element 120.

The beam splitter 116, the mirror 117, the condenser lens 118, and theseparator lens 119 function as an optical element that causes some ofthe subject light rays incident on the imaging optical system to beincident on an imaging element 310 of the camera device 300 that imagesthe subject light images through the imaging optical system and causesthe remaining subject light rays acquired by removing the some of thesubject light rays to be incident on the imaging element 120.

The mirror 117 may be removed, and the light rays reflected by the beamsplitter 116 may be directly incident on the condenser lens 118.

The imaging element 120 is an area sensor in which a plurality of pixelsis arranged on a light reception surface in a two-dimensional shape, andoutputs image signals corresponding to the two subject light imagesformed on the light reception surface. That is, the imaging element 120outputs a pair of image signals shift in a horizontal direction from onesubject light image formed by the imaging optical system.

It is possible to avoid a difficulty in precisely adjusting a positionbetween line sensors by using the area sensor as the imaging element 120compared to a case where the line sensors are used.

Among the pixels included in the imaging element 120, the pixel thatoutputs one of the pair of image signals shifted in the horizontaldirection constitutes the first signal detection section that receivesone luminous flux of the pair of luminous fluxes passing through twodifferent portions arranged in the horizontal direction of the pupilregion of the imaging optical system and detects the signalcorresponding to the a light reception amount.

Among the pixels included in the imaging element 120, the pixel thatoutputs the other one of the pair of image signals shifted in thehorizontal direction constitutes a second signal detection section thatreceives the other luminous flux of the pair of luminous fluxes passingthrough the two different portions arranged in the horizontal directionof the pupil region of the imaging optical system and detects the signalcorresponding to the a light reception amount.

Although the area sensor is used as the imaging element 120, a linesensor in which the plurality of pixels constituting the first signaldetection section is arranged in the horizontal direction may bedisposed in a position facing the lens 19R and a line sensor in whichthe plurality of pixels constituting the second signal detection sectionis arranged in the horizontal direction may be disposed in a positionfacing the lens 19R, instead of the imaging element 120.

The camera device 300 includes the imaging element 310 such as a CCDtype image sensor or a CMOS type image sensor disposed on the opticalaxis K of the lens device 100, and an image processing unit 320 thatgenerates captured image data by processing image signals acquired byimaging the subject light images by the imaging element 310.

The block configuration of the lens device 100 is the same as the lensdevice of FIG. 1, and includes a drive unit that drives the focus lensand a system control unit that controls the drive unit. The systemcontrol unit functions as the aforementioned functional blocks byexecuting the focusing control program.

However, the first signal group and the second signal group input to thesystem control unit are signals output from the first signal detectionsection and the second signal detection section of the imaging element120. In the camera system, the system control unit of the lens device100 functions as the focusing control device.

Although it has been described above that the digital camera is used asthe imaging device, an embodiment of a smartphone with a camera as theimaging device will be described below.

FIG. 29 shows the appearance of a smartphone 200 which is an embodimentof an imaging device of the invention. The smartphone 200 shown in FIG.29 has a flat plate-shaped housing 201, and includes a display inputunit 204 in which a display panel 202 as a display unit on one surfaceof the housing 201 and an operation panel 203 as an input unit areintegrated. The housing 201 includes a speaker 205, a microphone 206, anoperating unit 207, and a camera unit 208. The configuration of thehousing 201 is not limited thereto, and for example, a configuration inwhich the display unit and the input unit are independent from eachother may be employed, or a configuration having a folding structure ora slide mechanism may be employed.

FIG. 30 is a block diagram showing the configuration of the smartphone200 shown in FIG. 29. As shown in FIG. 30, principal components of thesmartphone include a wireless communication unit 210, a display inputunit 204, a call handling unit 211, an operating unit 207, a camera unit208, a storage unit 212, an external input/output unit 213, a globalpositioning system (GPS) receiving unit 214, a motion sensor unit 215, apower supply unit 216, and a main control unit 220. Principal functionsof the smartphone 200 include a wireless communication function ofperforming mobile wireless communication through a base station deviceBS (not shown) through a mobile communication network NW (not shown).

The wireless communication unit 210 performs wireless communication witha base station device BS in the mobile communication network NWaccording to an instruction of the main control unit 220. With the useof the wireless communication, transmission and reception of variouskinds of file data, such as voice data and image data, and electronicmail data, or reception of Web data, streaming data, or the like areperformed.

The display input unit 204 is a so-called touch panel which displaysimages (still images and moving images) or character information, or thelike to visually transfer information to the user and detects a user'soperation on the displayed information under the control of the maincontrol unit 220, and includes the display panel 202 and the operationpanel 203.

The display panel 202 uses a liquid crystal display (LCD), an organicelectro-luminescence display (OELD), or the like as a display device.

The operation panel 203 is a device which is placed such that an imagedisplayed on a display surface of the display panel 202 is visible, anddetects one or a plurality of coordinates of an operation with a user'sfinger or a stylus. If the device is operated with the user's finger orthe stylus, a detection signal due to the operation is output to themain control unit 220. Next, the main control unit 220 detects anoperation position (coordinates) on the display panel 202 based on thereceived detection signal.

As shown in FIG. 29, although the display panel 202 and the operationpanel 203 of the smartphone 200 illustrated as an embodiment of animaging device of the invention are integrated to constitute the displayinput unit 204, the operation panel 203 is arranged to completely coverthe display panel 202.

In a case where this arrangement is employed, the operation panel 203may have a function of detecting a user's operation even in a regionoutside the display panel 202. In other words, the operation panel 203may include a detection region (hereinafter, referred to as a displayregion) for a superimposed portion overlapping the display panel 202 anda detection region (hereinafter, referred to as a non-display region)for an outer edge portion not overlapping the display panel 202 otherthan the display region.

Although the size of the display region may completely match the size ofthe display panel 202, it is not necessary to match both of the size ofthe display region and the size of the display panel. The operationpanel 203 may include two sensitive regions including an outer edgeportion and an inner portion other than the outer edge portion. Thewidth of the outer edge portion is appropriately designed according tothe size of the housing 201 or the like. As a position detection systemwhich is employed in the operation panel 203, a matrix switching system,a resistive film system, a surface acoustic wave system, an infraredsystem, an electromagnetic induction system, an electrostaticcapacitance system, and the like are exemplified, and any system can beemployed.

The call handling unit 211 includes the speaker 205 and the microphone206, converts voice of the user input through the microphone 206 tovoice data processable in the main control unit 220 and outputs voicedata to the main control unit 220, or decodes voice data received by thewireless communication unit 210 or the external input/output unit 213and outputs voice from the speaker 205. As shown in FIG. 28, forexample, the speaker 205 can be mounted on the same surface as thesurface on which the display input unit 204 is provided, and themicrophone 206 can be mounted on the side surface of the housing 201.

The operating unit 207 is a hardware key using a key switch or the like,and receives an instruction from the user. For example, as shown in FIG.29, the operating unit 207 is a push button-type switch which is mountedon the side surface of the housing 201 of the smartphone 200, and isturned on by being depressed with a finger or the like and is turned offby restoration force of the panel or the like in a case where the fingeris released.

The storage unit 212 stores a control program or control data of themain control unit 220, application software, address data in associationwith the name, telephone number, and the like of a communicationpartner, data of transmitted and received electronic mail, Web datadownloaded by Web browsing, and downloaded content data, and temporarilystores streaming data or the like. The storage unit 212 is constitutedof an internal storage unit 217 embedded in the smartphone and anexternal storage unit 218 having a slot for a detachable externalmemory. The internal storage unit 217 and the external storage unit 218constituting the storage unit 212 are realized using a memory (forexample, a microSD (Registered Trademark) memory or the like), such as aflash memory type, a hard disk type, a multimedia card micro type, or acard type, or a storage medium, such as a random access memory (RAM) ora read only memory (ROM).

The external input/output unit 213 plays a role of an interface with allexternal devices connected to the smartphone 200, and is provided fordirect or indirect connection to other external devices throughcommunication or the like (for example, universal serial bus (USB), IEEE1394, or the like), or a network (for example, the Internet, wirelessLAN, Bluetooth (Registered trademark), radio frequency identification(RFID), infrared communication (infrared data association: IrDA(Registered Trademark), ultra wideband (UWB) (Registered Trademark),ZigBee (Registered Trademark), or the like).

The external devices connected to the smartphone 200 are, for example, awired or wireless headset, a wired or wireless external charger, a wiredor wireless data port, a memory card connected through a card socket, asubscriber identity module (SIM) card, a user identity module (UIM)card, an external audio-video device connected through an audio-videoinput/output (I/O) terminal, an external audio-video device connected ina wireless manner, a smartphone connected in a wired or wireless manner,a personal computer connected in a wired or wireless manner, a PDAconnected in a wired or wireless manner, an earphone connected in awired or wireless manner, and the like. The external input/output unit213 can transfer data transmitted from the external devices to therespective components in the smartphone 200 or can transmit data in thesmartphone 200 to the external devices.

The GPS receiving unit 214 receives GPS signals transmitted from GPSsatellites ST1 to STn according to an instruction of the main controlunit 220, executes positioning calculation processing based on aplurality of received GPS signals, and detects the position of thesmartphone 200 having latitude, longitude, and altitude. In a case wherepositional information can be acquired from the wireless communicationunit 210 or the external input/output unit 213 (for example, a wirelessLAN), the GPS receiving unit 214 can detect the position using thepositional information.

The motion sensor unit 215 includes, for example, a three-axisacceleration sensor or the like, and detects physical motion of thesmartphone 200 according to an instruction of the main control unit 220.The moving direction or acceleration of the smartphone 200 is detectedby detecting physical motion of the smartphone 200. The detection resultis output to the main control unit 220.

The power supply unit 216 supplies electric power stored in a battery(not shown) to the respective units of the smartphone 200 according toan instruction of the main control unit 220.

The main control unit 220 includes a microprocessor, operates accordingto the control program or control data stored in the storage unit 212,and integrally controls the respective units of the smartphone 200. Themain control unit 220 has a mobile communication control function ofcontrolling respective units of a communication system in order toperform voice communication or data communication through the wirelesscommunication unit 210, and an application processing function.

The application processing function is realized by the main control unit220 operating according to application software stored in the storageunit 212. The application processing function is, for example, aninfrared communication function of controlling the external input/outputunit 213 to perform data communication with a device facing thesmartphone 200, an electronic mail function of transmitting andreceiving electronic mail, a Web browsing function of browsing Webpages, or the like.

The main control unit 220 has an image processing function of displayingvideo on the display input unit 204, or the like based on image data(still image or moving image data), such as received data or downloadedstreaming data. The image processing function refers to a function ofthe main control unit 220 decoding image data, performing imageprocessing on the decoding result, and displaying an image on thedisplay input unit 204.

The main control unit 220 executes display control on the display panel202 and operation detection control for detecting a user's operationthrough the operating unit 207 and the operation panel 203. With theexecution of the display control, the main control unit 220 displays anicon for activating application software or a software key, such as ascroll bar, or displays a window for creating electronic mail. Thescroll bar refers to a software key for receiving an instruction to movea display portion of an image which is too large to fit into the displayregion of the display panel 202.

With the execution of the operation detection control, the main controlunit 220 detects a user's operation through the operating unit 207,receives an operation on the icon or an input of a character string inan entry column of the window through the operation panel 203, orreceives a scroll request of a display image through the scroll bar.

In addition, with the execution of the operation detection control, themain control unit 220 has a touch panel control function of determiningwhether an operation position on the operation panel 203 is thesuperimposed portion (display region) overlapping the display panel 202or the outer edge portion (non-display region) not overlapping thedisplay panel 202 other than the display region, and controlling thesensitive region of the operation panel 203 or the display position ofthe software key.

The main control unit 220 may detect a gesture operation on theoperation panel 203 and may execute a function set in advance accordingto the detected gesture operation. The gesture operation is not aconventional simple touch operation, but means an operation to render atrack with a finger or the like, an operation to simultaneouslydesignate a plurality of positions, or an operation to render a trackfor at least one of a plurality of positions by combining theabove-described operations.

The camera unit 208 includes the configuration other than the externalmemory control unit 20, the recording medium 21, the display controlunit 22, the display unit 23, and the operating unit 14 in the digitalcamera shown in FIG. 1.

Captured image data generated by the camera unit 208 can be recorded inthe storage unit 212 or can be output through the external input/outputunit 213 or the wireless communication unit 210.

In the smartphone 200 shown in FIG. 29, although the camera unit 208 ismounted on the same surface as the display input unit 204, the mountingposition of the camera unit 208 is not limited thereto, and the cameraunit 208 may be mounted on the rear surface of the display input unit204.

The camera unit 208 can be used for various functions of the smartphone200. For example, an image acquired by the camera unit 208 can bedisplayed on the display panel 202, or an image in the camera unit 208can be used as one operation input of the operation panel 203.

In a case where the GPS receiving unit 214 detects the position, theposition may be detected with reference to an image from the camera unit208. In addition, the optical axis direction of the camera unit 208 ofthe smartphone 200 can be determined or a current use environment may bedetermined with reference to an image from the camera unit 208 withoutusing the three-axis acceleration sensor or in combination with thethree-axis acceleration sensor. Of course, an image from the camera unit208 may be used in application software.

In addition, image data of a still image or a moving image may beattached with positional information acquired by the GPS receiving unit214, voice information (which may be converted to text informationthrough voice-text conversion by the main control unit or the like)acquired by the microphone 206, posture information acquired by themotion sensor unit 215, or the like and can be recorded in the storageunit 212, or may be output through the external input/output unit 213 orthe wireless communication unit 210.

As stated above, the following matters are disclosed in thisspecification.

Disclosed is a focusing control device comprising a sensor that has afocus detection area in which a plurality of first signal detectionsections which receives one of a pair of luminous fluxes passing throughdifferent portions arranged in one direction of a pupil region of animaging optical system including a focus lens and detects signalscorresponding to light reception amounts and a plurality of secondsignal detection sections which receives the other one of the pair ofluminous fluxes and detects signals corresponding to light receptionamounts are formed, a first correlation value generation unit thatacquires correlation values between a first signal group output from theplurality of first signal detection sections of the focus detection areaand a second signal group output from the plurality of second signaldetection sections of the focus detection area, a second correlationvalue generation unit that performs a process of acquiring correlationvalues between a third signal group output from the plurality of firstsignal detection sections included in each of divided areas in a statein which the focus detection area is divided in the one direction and afourth signal group output from the plurality of second signal detectionsections included in the divided area, for each divided area, a firstphase difference amount measurement unit that measures a first phasedifference amount between the first signal group and the second signalgroup from the correlation values acquired by the first correlationvalue generation unit, a second phase difference amount measurement unitthat measures a second phase difference amount between the third signalgroup and the fourth signal group for each divided area from thecorrelation values acquired by the second correlation value generationunit, a target position determination unit that selectively performs afirst process of determining a target position of the focus lens basedon the first phase difference amount and a second process of determiningthe target position of the focus lens based on the second phasedifference amount, and a lens driving control unit that drives the focuslens to the target position determined through the first process or thesecond process. The target position determination unit calculates atemporary target position of the focus lens based on any one phasedifference amount of the first phase difference amount and the pluralityof second phase difference amounts, determines whether or not the targetposition of the focus lens based on the first phase difference amountfalls within a predetermined depth range using the temporary targetposition in a movement direction of the focus lens as a reference,performs the first process in a case where the target position of thefocus lens based on the first phase difference amount falls within thedepth range, and performs the second process in a case where the targetposition of the focus lens based on the first phase difference amount isout of the depth range, and the target position of the focus lens isdetermined based on the second phase difference amounts measured for thedivided areas in which the target position of the focus lens based onthe second phase difference amounts falls within the depth range in thesecond process.

In the disclosed focusing control device, the target positiondetermination unit determines the target position of the focus lensbased on an average value of the second phase difference amountsmeasured for the divided areas in which the target position of the focuslens based on the second phase difference amounts falls within the depthrange in the second process.

In the disclosed focusing control device, the target positiondetermination unit calculates the temporary target position based on aminimum phase difference amount of the first phase difference amount andthe plurality of second phase difference amounts.

The disclosed focusing control device further comprises a targetposition prediction unit that predicts the target position of the focuslens based on a target position history of the focus lens determined bythe target position determination unit, and a phase difference amountprediction unit that converts a difference between the target positionpredicted by the target position prediction unit and a position of thefocus lens into a phase difference amount to predict the phasedifference amount. The target position determination unit extracts aphase difference amount closest to the phase difference amount predictedby the phase difference amount prediction unit from the first phasedifference amount and the plurality of second phase difference amounts,and calculates the temporary target position based on the extractedphase difference amount.

In the disclosed focusing control device, the second correlation valuegeneration unit acquires the correlation values between the third signalgroup and the fourth signal group for an arbitrary divided area bydecomposing the correlation values between the first signal group andthe second signal group generated by the first correlation valuegeneration unit into components of the correlation values for eachdivided area and storing an integrated value of the decomposedcomponents between the first signal group and the second signal groupcorresponding to an arbitrary shift amount in the arbitrary dividedarea, as a correlation value at the arbitrary shift amount in thearbitrary divided area.

Disclosed is a lens device comprising the focusing control device, andan imaging optical system including a focus lens for causing light to beincident on the sensor.

Disclosed is an imaging device comprising the focusing control device.

Disclosed is a focusing control method comprising a first correlationvalue generation step of acquiring correlation values between a firstsignal group output from a plurality of first signal detection sectionsof a focus detection area of a sensor and a second signal group outputfrom a plurality of second signal detection sections of the focusdetection area, the plurality of first signal detection sections whichreceives one of a pair of luminous fluxes passing through differentportions arranged in one direction of a pupil region of an imagingoptical system including a focus lens and detects signals correspondingto light reception amounts and the plurality of second signal detectionsections which receives the other one of the pair of luminous fluxes anddetects signals corresponding to light reception amounts being formed inthe focus detection area, a second correlation value generation step ofperforming a process of acquiring correlation values between a thirdsignal group output from the plurality of first signal detectionsections included in each of divided areas in a state in which the focusdetection area is divided in the one direction and a fourth signal groupoutput from the plurality of second signal detection sections includedin the divided area, for each divided area, a first phase differenceamount measurement step of measuring a first phase difference amountbetween the first signal group and the second signal group from thecorrelation values acquired in the first correlation value generationstep, a second phase difference amount measurement step of measuring asecond phase difference amount between the third signal group and thefourth signal group for each divided area from the correlation valuesacquired in the second correlation value generation step, a targetposition determination step of selectively performing a first process ofdetermining a target position of the focus lens based on the first phasedifference amount and a second process of determining the targetposition of the focus lens based on the second phase difference amount,and a lens driving control step of driving the focus lens to the targetposition determined through the first process or the second process. Inthe target position determination step, a temporary target position ofthe focus lens is calculated based on any one phase difference amount ofthe first phase difference amount and the plurality of second phasedifference amounts, whether or not the target position of the focus lensbased on the first phase difference amount falls within a predetermineddepth range using the temporary target position in a movement directionof the focus lens as a reference is determined, the first process isperformed in a case where the target position of the focus lens based onthe first phase difference amount falls within the depth range, and thesecond process is performed in a case where the target position of thefocus lens based on the first phase difference amount is out of thedepth range, and the target position of the focus lens is determinedbased on the second phase difference amounts measured for the dividedareas in which the target position of the focus lens based on the secondphase difference amounts falls within the depth range in the secondprocess.

In the disclosed focusing control method, in the target positiondetermination step, the target position of the focus lens is determinedbased on an average value of the second phase difference amountsmeasured for the divided areas in which the target position of the focuslens based on the second phase difference amounts falls within the depthrange in the second process.

In the disclosed focusing control method, in the target positiondetermination step, the temporary target position is calculated based ona minimum phase difference amount of the first phase difference amountand the plurality of second phase difference amounts.

The disclosed focusing control method further comprises a targetposition prediction step of predicting the target position of the focuslens based on a target position history of the focus lens determined inthe target position determination step, and a phase difference amountprediction step of converting a difference between the target positionpredicted in the target position prediction step and a position of thefocus lens into a phase difference amount and predicting the phasedifference amount. In the target position determination step, a phasedifference amount closest to the phase difference amount predicted inthe phase difference amount prediction step is extracted from the firstphase difference amount and the plurality of second phase differenceamounts, and the temporary target position is calculated based on theextracted phase difference amount.

In the disclosed focusing control method, in the second correlationvalue generation step, the correlation values between the third signalgroup and the fourth signal group for an arbitrary divided area isacquired by decomposing the correlation values between the first signalgroup and the second signal group generated in the first correlationvalue generation step into components of the correlation values for eachdivided area and storing an integrated value of the decomposedcomponents between the first signal group and the second signal groupcorresponding to an arbitrary shift amount in the arbitrary dividedarea, as a correlation value at the arbitrary shift amount in thearbitrary divided area.

Disclosed is a focusing control program causing a computer to perform afirst correlation value generation step of acquiring correlation valuesbetween a first signal group output from a plurality of first signaldetection sections of a focus detection area of a sensor and a secondsignal group output from a plurality of second signal detection sectionsof the focus detection area, the plurality of first signal detectionsections which receives one of a pair of luminous fluxes passing throughdifferent portions arranged in one direction of a pupil region of animaging optical system including a focus lens and detects signalscorresponding to light reception amounts and the plurality of secondsignal detection sections which receives the other one of the pair ofluminous fluxes and detects signals corresponding to light receptionamounts being formed in the focus detection area, a second correlationvalue generation step of performing a process of acquiring correlationvalues between a third signal group output from the plurality of firstsignal detection sections included in each of divided areas in a statein which the focus detection area is divided in the one direction and afourth signal group output from the plurality of second signal detectionsections included in the divided area, for each divided area, a firstphase difference amount measurement step of measuring a first phasedifference amount between the first signal group and the second signalgroup from the correlation values acquired in the first correlationvalue generation step, a second phase difference amount measurement stepof measuring a second phase difference amount between the third signalgroup and the fourth signal group for each divided area from thecorrelation values acquired in the second correlation value generationstep, a target position determination step of selectively performing afirst process of determining a target position of the focus lens basedon the first phase difference amount and a second process of determiningthe target position of the focus lens based on the second phasedifference amount, and a lens driving control step of driving the focuslens to the target position determined through the first process or thesecond process. In the target position determination step, a temporarytarget position of the focus lens is calculated based on any one phasedifference amount of the first phase difference amount and the pluralityof second phase difference amounts, whether or not the target positionof the focus lens based on the first phase difference amount fallswithin a predetermined depth range using the temporary target positionin a movement direction of the focus lens as a reference is determined,the first process is performed in a case where the target position ofthe focus lens based on the first phase difference amount falls withinthe depth range, and the second process is performed in a case where thetarget position of the focus lens based on the first phase differenceamount is out of the depth range, and the target position of the focuslens is determined based on the second phase difference amounts measuredfor the divided areas in which the target position of the focus lensbased on the second phase difference amounts falls within the depthrange in the second process.

The invention is applied to, in particular, a television camera forbroadcasting or the like, thereby achieving high convenience andeffectiveness.

Although the invention has been described above by a specificembodiment, the invention is not limited to the embodiment, and variousmodifications may be made without departing from the technical spirit ofthe invention disclosed herein.

This application is based on Japanese Patent Application (2015-194234),filed Sep. 30, 2015, the content of which is incorporated herein.

EXPLANATION OF REFERENCES

40: lens device

1: imaging lens

2: stop

4: lens control unit

5: imaging element

6: analog signal processing unit

7: analog-to-digital conversion circuit

8: lens drive unit

9: stop drive unit

10: imaging element drive unit

11, 11 a, 11 b: system control unit

50: light reception surface

51: imaging pixel

53: AF area

53 s: divided area

52, 52A, 52B: phase difference detection pixel

11A: first correlation value generation unit

11B: second correlation value generation unit

11C: first phase difference amount measurement unit

11D: second phase difference amount measurement unit

11E: target position determination unit

11F: lens driving control unit

11G: target position prediction unit

11H: phase difference amount prediction unit

14: operating unit

15: memory control unit

16: main memory

17: digital signal processing unit

18: compression/decompression processing unit

19L, 19R: lens

20: external memory control unit

21: recording medium

22: display control unit

23: display unit

24: control bus

25: data bus

100: lens device

111: focus lens

112: zoom lens

114: stop

115: master lens group

116: beam splitter

116 a: reflection surface

117: mirror

118: condenser lens

119: separator lens

120: imaging element

121: unit

200: smartphone

201: housing

202: display panel

203: operation panel

204: display input unit

205: speaker

206: microphone

207: operating unit

208: camera unit

210: wireless communication unit

211: call handling unit

212: storage unit

213: external input/output unit

214: GPS receiving unit

215: motion sensor unit

216: power supply unit

217: internal storage unit

218: external storage unit

220: main control unit

300: camera device

310: imaging element

320: image processing unit

ST1 to STn: GPS satellite

A1: range

B1, B2, G1, G2: phase difference detection pixel

Cm, Cs: correlation curve

H1, H2, H3, H4, H5: subject

s1: first correlation value

s2: second correlation value

c: opening

X: row direction

Y: column direction

X1, X2, X6: evaluation value curve

X3, X4: determination evaluation value curve

X5, X7: data curve

What is claimed is:
 1. A focusing control device comprising: a sensorthat has a focus detection area in which a plurality of first signaldetection sections which receives one of a pair of luminous fluxespassing through different portions arranged in one direction of a pupilregion of an imaging optical system including a focus lens and detectssignals corresponding to light reception amounts and a plurality ofsecond signal detection sections which receives other one of the pair ofluminous fluxes and detects signals corresponding to light receptionamounts are formed; a first correlation value generation unit thatacquires correlation values between a first signal group output from theplurality of first signal detection sections of the focus detection areaand a second signal group output from the plurality of second signaldetection sections of the focus detection area; a second correlationvalue generation unit that performs a process of acquiring correlationvalues between a third signal group output from the plurality of firstsignal detection sections included in each of divided areas in a statein which the focus detection area is divided in the one direction and afourth signal group output from the plurality of second signal detectionsections included in the divided area, for each of the divided areas; afirst phase difference amount measurement unit that measures a firstphase difference amount between the first signal group and the secondsignal group from the correlation values acquired by the firstcorrelation value generation unit; a second phase difference amountmeasurement unit that measures a second phase difference amount betweenthe third signal group and the fourth signal group for each of thedivided areas from the correlation values acquired by the secondcorrelation value generation unit; a target position determination unitthat selectively performs a first process of determining a targetposition of the focus lens based on the first phase difference amountand a second process of determining the target position of the focuslens based on the second phase difference amount; and a lens drivingcontrol unit that drives the focus lens to the target positiondetermined through the first process or the second process, wherein thetarget position determination unit calculates a temporary targetposition of the focus lens based on any one phase difference amount ofthe first phase difference amount and the plurality of second phasedifference amounts, determines whether or not the target position of thefocus lens based on the first phase difference amount falls within apredetermined depth range using the temporary target position in amovement direction of the focus lens as a reference, performs the firstprocess in a case where the target position of the focus lens based onthe first phase difference amount falls within the depth range, andperforms the second process in a case where the target position of thefocus lens based on the first phase difference amount is out of thedepth range, and in the second process, the target position of the focuslens is determined based on the second phase difference amounts measuredfor the divided areas in which the target position of the focus lensbased on the second phase difference amounts falls within the depthrange.
 2. The focusing control device according to claim 1, wherein thetarget position determination unit determines the target position of thefocus lens based on an average value of the second phase differenceamounts measured for the divided areas in which the target position ofthe focus lens based on the second phase difference amounts falls withinthe depth range in the second process.
 3. The focusing control deviceaccording to claim 1, wherein the target position determination unitcalculates the temporary target position based on a minimum phasedifference amount of the first phase difference amount and the pluralityof second phase difference amounts.
 4. The focusing control deviceaccording to claim 1, further comprising: a target position predictionunit that predicts the target position of the focus lens based on atarget position history of the focus lens determined by the targetposition determination unit; and a phase difference amount predictionunit that converts a difference between the target position predicted bythe target position prediction unit and a position of the focus lensinto a phase difference amount to predict the phase difference amount,wherein the target position determination unit extracts a phasedifference amount closest to the phase difference amount predicted bythe phase difference amount prediction unit from the first phasedifference amount and the plurality of second phase difference amounts,and calculates the temporary target position based on the extractedphase difference amount.
 5. The focusing control device according toclaim 1, wherein the second correlation value generation unit acquiresthe correlation values between the third signal group and the fourthsignal group for an arbitrary divided area by decomposing thecorrelation values between the first signal group and the second signalgroup generated by the first correlation value generation unit intocomponents of the correlation values for each of the divided areas andstoring an integrated value of the decomposed components between thefirst signal group and the second signal group corresponding to anarbitrary shift amount in the arbitrary divided area, as a correlationvalue at the arbitrary shift amount in the arbitrary divided area.
 6. Alens device comprising: the focusing control device according to claim1; and an imaging optical system including a focus lens for causinglight to be incident on the sensor.
 7. An imaging device comprising thefocusing control device according to claim
 1. 8. A focusing controlmethod comprising: a first correlation value generation step ofacquiring correlation values between a first signal group output from aplurality of first signal detection sections of a focus detection areaof a sensor and a second signal group output from a plurality of secondsignal detection sections of the focus detection area, the plurality offirst signal detection sections receiving one of a pair of luminousfluxes passing through different portions arranged in one direction of apupil region of an imaging optical system including a focus lens anddetecting signals corresponding to light reception amounts and theplurality of second signal detection sections receiving other one of thepair of luminous fluxes and detecting signals corresponding to lightreception amounts being formed in the focus detection area; a secondcorrelation value generation step of performing a process of acquiringcorrelation values between a third signal group output from theplurality of first signal detection sections included in each of dividedareas in a state in which the focus detection area is divided in the onedirection and a fourth signal group output from the plurality of secondsignal detection sections included in the divided area, for each of thedivided areas; a first phase difference amount measurement step ofmeasuring a first phase difference amount between the first signal groupand the second signal group from the correlation values acquired in thefirst correlation value generation step; a second phase differenceamount measurement step of measuring a second phase difference amountbetween the third signal group and the fourth signal group for each ofthe divided areas from the correlation values acquired in the secondcorrelation value generation step; a target position determination stepof selectively performing a first process of determining a targetposition of the focus lens based on the first phase difference amountand a second process of determining the target position of the focuslens based on the second phase difference amount; and a lens drivingcontrol step of driving the focus lens to the target position determinedthrough the first process or the second process, wherein, in the targetposition determination step, a temporary target position of the focuslens is calculated based on any one phase difference amount of the firstphase difference amount and the plurality of second phase differenceamounts, whether or not the target position of the focus lens based onthe first phase difference amount falls within a predetermined depthrange using the temporary target position in a movement direction of thefocus lens as a reference is determined, the first process is performedin a case where the target position of the focus lens based on the firstphase difference amount falls within the depth range, and the secondprocess is performed in a case where the target position of the focuslens based on the first phase difference amount is out of the depthrange, and in the second process, the target position of the focus lensis determined based on the second phase difference amounts measured forthe divided areas in which the target position of the focus lens basedon the second phase difference amounts falls within the depth range. 9.The focusing control method according to claim 8, wherein, in the targetposition determination step, the target position of the focus lens isdetermined based on an average value of the second phase differenceamounts measured for the divided areas in which the target position ofthe focus lens based on the second phase difference amounts falls withinthe depth range in the second process.
 10. The focusing control methodaccording to claim 8, wherein, in the target position determinationstep, the temporary target position is calculated based on a minimumphase difference amount of the first phase difference amount and theplurality of second phase difference amounts.
 11. The focusing controlmethod according to claim 8, further comprising: a target positionprediction step of predicting the target position of the focus lensbased on a target position history of the focus lens determined in thetarget position determination step; and a phase difference amountprediction step of converting a difference between the target positionpredicted in the target position prediction step and a position of thefocus lens into a phase difference amount, and predicting the phasedifference amount, wherein, in the target position determination step, aphase difference amount closest to the phase difference amount predictedin the phase difference amount prediction step is extracted from thefirst phase difference amount and the plurality of second phasedifference amounts, and the temporary target position is calculatedbased on the extracted phase difference amount.
 12. The focusing controlmethod according to claim 8, wherein, in the second correlation valuegeneration step, the correlation values between the third signal groupand the fourth signal group for an arbitrary divided area is acquired bydecomposing the correlation values between the first signal group andthe second signal group generated in the first correlation valuegeneration step into components of the correlation values for eachdivided area and storing an integrated value of the decomposedcomponents between the first signal group and the second signal groupcorresponding to an arbitrary shift amount in the arbitrary dividedarea, as a correlation value at the arbitrary shift amount in thearbitrary divided area.
 13. A computer readable medium storing afocusing control program causing a computer to perform: a firstcorrelation value generation step of acquiring correlation valuesbetween a first signal group output from a plurality of first signaldetection sections of a focus detection area of a sensor and a secondsignal group output from a plurality of second signal detection sectionsof the focus detection area, the plurality of first signal detectionsections receiving one of a pair of luminous fluxes passing throughdifferent portions arranged in one direction of a pupil region of animaging optical system including a focus lens and detecting signalscorresponding to light reception amounts and the plurality of secondsignal detection sections receiving other one of the pair of luminousfluxes and detecting signals corresponding to light reception amountsbeing formed in the focus detection; a second correlation valuegeneration step of performing a process of acquiring correlation valuesbetween a third signal group output from the plurality of first signaldetection sections included in each of divided areas in a state in whichthe focus detection area is divided in the one direction and a fourthsignal group output from the plurality of second signal detectionsections included in the divided area, for each of the divided areas; afirst phase difference amount measurement step of measuring a firstphase difference amount between the first signal group and the secondsignal group from the correlation values acquired in the firstcorrelation value generation step; a second phase difference amountmeasurement step of measuring a second phase difference amount betweenthe third signal group and the fourth signal group for each of thedivided areas from the correlation values acquired in the secondcorrelation value generation step; a target position determination stepof selectively performing a first process of determining a targetposition of the focus lens based on the first phase difference amountand a second process of determining the target position of the focuslens based on the second phase difference amount; and a lens drivingcontrol step of driving the focus lens to the target position determinedthrough the first process or the second process, wherein, in the targetposition determination step, a temporary target position of the focuslens is calculated based on any one phase difference amount of the firstphase difference amount and the plurality of second phase differenceamounts, whether or not the target position of the focus lens based onthe first phase difference amount falls within a predetermined depthrange using the temporary target position in a movement direction of thefocus lens as a reference is determined, the first process is performedin a case where the target position of the focus lens based on the firstphase difference amount falls within the depth range, and the secondprocess is performed in a case where the target position of the focuslens based on the first phase difference amount is out of the depthrange, and the target position of the focus lens is determined based onthe second phase difference amounts measured for the divided areas inwhich the target position of the focus lens based on the second phasedifference amounts falls within the depth range in the second process.